namespace devtm.Aop.Emit
{
    using System;
    

    [Serializable]
    public class DelegateCreateExpression : EmitExpression
    {
        private EmitTypeReference delegateType;
        private string methodName;
        private EmitExpression targetObject;


        public DelegateCreateExpression()
        {
        }

        public DelegateCreateExpression(EmitTypeReference delegateType, EmitExpression targetObject, string methodName)
        {
            this.delegateType = delegateType;
            this.targetObject = targetObject;
            this.methodName = methodName;
        }

        public EmitTypeReference DelegateType
        {
            get
            {
                if (this.delegateType == null)
                {
                    this.delegateType = new EmitTypeReference();
                }
                return this.delegateType;
            }
            set
            {
                this.delegateType = value;
            }
        }

        public string MethodName
        {
            get
            {
                if (this.methodName != null)
                {
                    return this.methodName;
                }
                return string.Empty;
            }
            set
            {
                this.methodName = value;
            }
        }

        public EmitExpression TargetObject
        {
            get
            {
                return this.targetObject;
            }
            set
            {
                this.targetObject = value;
            }
        }



        public override System.Collections.Generic.IEnumerable<Mono.Cecil.Cil.Instruction> Compile()
        {
            throw new NotImplementedException();
        }
    }
}
